﻿<%@ CODEPAGE=65001 %>
<%
'///////////////////////////////////////////////////////////////////////////////
'// 插件应用:    Z-Blog 2.0 其它版本未知
'// 插件制作:    狼的旋律(http://www.wilf.cn) / zsx(http://www.zsxsoft.com)
'// 备    注:    进入加密相册
'// 最后修改:
'// 最后版本:
'///////////////////////////////////////////////////////////////////////////////
%>
<% Option Explicit %>
<% 'On Error Resume Next %>
<% Response.Charset="UTF-8" %>
<% Response.Buffer=True %>
<!-- #include file="../../c_option.asp" -->
<!-- #include file="../../../zb_system/function/c_function.asp" -->
<!-- #include file="../../../zb_system/function/c_system_lib.asp" -->
<!-- #include file="../../../zb_system/function/c_system_base.asp" -->
<!-- #include file="../../../zb_system/function/c_system_plugin.asp" -->
<!-- #include file="../p_config.asp" -->
<%
Call System_Initialize()
Call WindsPhoto_Initialize()

If CheckpluginState("windsphoto") = False Then Call ShowError(48)

Dim pa,rs,ps,typeid
pa = Request.Form("pase")
If pa = "" Then
    Response.Write "<script>alert('对不起,密码不可以为空!');history.back();</script>"
End If
If IsNumeric(Request.QueryString("typeid")) = False Then
    Response.Write "<script>alert('对不起,参数错误,请重新再试!');history.back();</script>"
Else
    typeid = CInt(Request.QueryString("typeid"))
End If

Set rs = objConn.Execute("select * from WindsPhoto_zhuanti where id="&typeid)
If rs("pass") = "" Or IsNull(rs("pass")) = True Then
    Response.Redirect "album.asp?typeid="&typeid
    Response.End
Else
    ps = rs("pass")
End If
If ps <> pa Then
    Response.Write "<script>alert('对不起,密码错误,请重新再试!');history.back();</script>"
    Response.End
Else
    Response.Cookies("WindsPhoto"&typeid) = pa
	Response.Cookies("WindsPhoto"&typeid).Expires = date+1
    Response.Redirect "album.asp?typeid="&typeid
    Response.End
End If

Call System_Terminate()
%>